/**
 * 
 */
package com.wsj.dao.hibernate;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.wsj.dao.IBmResearchInstitutionDao;
import com.wsj.web.vo.homeSite.BmResearchInstitution;

/**
 * @author fengbin  createTime:2009-7-25
 * 研究机构
 */
public class BmResearchInstitutionDaoImpl extends HibernateDaoSupport implements IBmResearchInstitutionDao {

	/*********
	 * 通过id,获取研究机构对象
	 */
	public BmResearchInstitution getBmResearchInstitutionById(int bmResearchInstitutionId) throws DataAccessException {
		
		 return (BmResearchInstitution) this.getHibernateTemplate().get(BmResearchInstitution.class, bmResearchInstitutionId);
		
	}

	/*********
	 * 获取研究机构列表
	 */
	@SuppressWarnings("unchecked")
	public List<BmResearchInstitution> getBmResearchInstitutionList() throws DataAccessException {
		
		return this.getHibernateTemplate().find(" from BmResearchInstitution b order by  b.id desc");
	}

}
